package com.itheima.iojob2;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

public class Test {
    public static void main(String[] args) {
        try
          (  FileInputStream fis = new FileInputStream("E:/test/image1/picture.jpeg");
            FileOutputStream fos = new FileOutputStream("E:/test/image2/picture2.jpeg");)
        { byte[] buf = new byte[1024];
            int len;
            while((len=fis.read(buf))!=-1){
                fos.write(buf,0,len);
            }
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
